@extends('layout.index')
@section('title','用户地址修改')
@section('content')
	<div class="mws-panel grid_8">
    	<div class="mws-panel-header">
        	<span>用户地址修改</span>
        </div>
        <div class="mws-panel-body no-padding">
        	<form action="/admin/address/update" method='post' class="mws-form">
        		@if(count($errors) > 0)
        			<div class="mws-form-message error">
        				修改失败!
        				<ul>
        					@foreach($errors->all() as $error)
								<li>{{ $error }}</li>
        					@endforeach
        				</ul>
        			</div>
        		@endif

        		<div class="mws-form-inline">
                    <input type="hidden" name='id' value='{{$address->id}}'>
        			
        			
        			<div class="mws-form-row">
        				<label class="mws-form-label">用户名</label>
        				<div class="mws-form-item">
        					<input type="text" name='name' readonly value='{{$address->name}}' class="smallinfo">
        				</div>
        			</div>
                    <div class="mws-form-row">
                        <label class="mws-form-label">收件人</label>
                        <div class="mws-form-item">
                            <input type="text" name='getman'  value='{{$address->getman}}' class="smallinfo">
                        </div>
                    </div>
                    <div class="mws-form-row">
                        <label class="mws-form-label">联系方式</label>
                        <div class="mws-form-item">
                            <input type="text" name='phone' value='{{$address->phone}}' class="smallinfo">
                        </div>
                    </div>
                    <div class="mws-form-row">
                        <label class="mws-form-label">邮编</label>
                        <div class="mws-form-item">
                            <input type="text" name='mailcode' value='{{$address->mailcode}}' class="smallinfo">
                        </div>
                    </div>
                    <div class="mws-form-row">
                        <label class="mws-form-label">地址</label>
                        <div class="mws-form-item">
                            <input type="text" name='address' value='{{$address->address}}' class="small">
                        </div>
                    </div>
                    <div class="mws-form-row">
                        <label class="mws-form-label">是否设为默认地址</label>
                        <div class="mws-form-item">
                            <select class="smaluserinfo" name='status'>
                                <option value='0'>是</option>
                                <option value='1'>否</option>
                            </select>
                        </div>
                    </div>
                    
                    <input type="hidden" name='id' value='{{$address->id}}'>
        			{{csrf_field()}}	
        		</div>
        		<div class="mws-button-row">
        			<input type="submit" class="btn btn-primary" value="修改">
        		</div>
        	</form>
        </div>    	
    </div>
@endsection